<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateCollegeTrainingPlansTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('college_training_plans', function (Blueprint $table) {
            $table->id();
            $table->string('name', 64)->default('')->comment('计划名称');
            $table->unsignedTinyInteger('type')->default(0)->comment('培训类型 1校区 2属地');
            $table->unsignedTinyInteger('campus')->default(0)->comment('校区 1北京 2上海 3深圳 4其他');
            $table->unsignedInteger('planStartTime')->default(0)->comment('培训周期start');
            $table->unsignedInteger('planEndTime')->default(0)->comment('培训周期end');
            $table->unsignedInteger('courseStartTime')->default(0)->comment('理论考试开始时间；0=不限制');
            $table->unsignedInteger('teacherShopId')->default(0)->comment('带训门店id');
            $table->unsignedInteger('studentShopId')->default(0)->comment('参训门店id');
            $table->string('address', 255)->default('')->comment('培训地点');


            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment = '商学院 - 培训计划';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('college_training_plans');
    }
}
